<?php if(!empty($message)): ?>
  <div class="message"><?php echo $sf_flash->get('message') ?></div>
<?php endif; ?>

<?php if(empty($request_cid)): ?> 
<?php echo form_tag('management/showOverview?id='.$location->getId().'&hid='.$hardware->getId().'&dest=hardware&view=updateSoftware') ?>
<?php echo input_hidden_tag('id', $location->getId()) ?>
Kategorie: 
<select name="category_id">
<?php foreach($hardware->getCategories() as $category_item): ?>
<option value="<?php echo($category_item->getId()) ?>"><?php echo($category_item->getName()) ?></option>
<?php endforeach; ?>
</select>
<?php echo submit_tag('auswählen') ?>
</form>
<?php endif; ?>

<?php if(!empty($request_cid)): ?>
Ausgewählte Kategorie: <?php echo $hardware->getCategoryNameById($request_cid) ?> (<?php echo link_to('E', 'management/showOverview?id='.$location->getId().'&hid='.$hardware->getId().'&dest=hardware&view=updateSoftware') ?>)
<?php echo form_tag('management/updateSoftware') ?>
<?php echo input_hidden_tag('cid', $request_cid) ?>
<?php echo input_hidden_tag('hid', $request_hid) ?>
<?php echo input_hidden_tag('id', $request_id) ?>
<?php if(!empty($installed_software)): ?>
Software: 
<select name="sid">
<?php foreach($installed_software as $software_item): ?>
<option value="<?php echo($software_item->getId()) ?>"><?php echo($software_item->getName()) ?> <?php echo($software_item->getVersion()) ?></option>
<?php endforeach; ?>
</select>
<?php echo submit_tag('hinzufügen', array('class' => 'button')) ?>
</form>
<?php endif; ?>
<?php endif; ?>